package com.fenghen.notfoelearning;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowFactory;
import com.intellij.ui.content.Content;
import com.intellij.ui.content.ContentManager;
import org.jetbrains.annotations.NotNull;

public class MyToolWindowFactory implements ToolWindowFactory {
    @Override
    public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
        MyToolWindowPanel myToolWindowPanel = new MyToolWindowPanel();
        ContentManager contentManager = toolWindow.getContentManager();

        Content content = contentManager.getFactory().createContent(myToolWindowPanel, "My Plugin", false);
        contentManager.addContent(content);
    }
}
